package de.jmda.gen.java.impl;

import static org.junit.Assert.assertTrue;

import org.apache.log4j.Logger;
import org.junit.Test;

import de.jmda.gen.GeneratorException;
import de.jmda.gen.impl.DefaultGenerator;
import de.jmda.gen.java.DeclaredElementGenerator;

public class JUT_DefaultDeclaredElementGenerator
{
	private final static Logger LOGGER =
      Logger.getLogger(JUT_DefaultDeclaredElementGenerator.class);

	@Test
	public void testDefaultDeclaredElementGenerator()
			throws GeneratorException
	{
		String input = "test";

		DeclaredElementGenerator generator =
				new DefaultDeclaredElementGenerator(new DefaultGenerator(input));

		StringBuffer generated = generator.generate();

		LOGGER.debug("generated [" + generated + "]");

		assertTrue(
				"unexpected declared element [" + generated + "]",
				input.contentEquals(generated));
	}
}